REQUEST scope is not limited to HTTP. For WebSockets the REQUEST token resolves to the Socket client object. For microservices it resolves to the incoming message payload. The shape of the injected object differs per transport so code using @Inject(REQUEST) must be written defensively if shared across multiple transports.
HTTP (Express/Fastify) — resolves to the native Request object with headers, body, ip, user, etc.
WebSockets — resolves to the Socket.IO Socket client instance.
Microservices (TCP, Redis, Kafka) — resolves to the incoming message/event payload object.
GraphQL — use the CONTEXT token from @nestjs/graphql instead of REQUEST for the GraphQL execution context.
If a REQUEST-scoped service is shared across transports, add runtime type checks on the injected object.